package xg2013.totoro.domain;



import java.io.Serializable;
import java.util.Collection;

import javax.persistence.CascadeType;
import javax.persistence.DiscriminatorColumn;
import javax.persistence.Embedded;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;

/**
 * @generated
 */
@Entity
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
@DiscriminatorColumn(name = "graduateProjectCategory")
public class GraduateProject implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	/**
	 * @generated
	 */
	private String category;
	
	private String title;
	/**
	 * @generated
	 */
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Integer id;
	/**
	 * @generated
	 */
	private Integer year;
	/**
	 * @generated
	 */
	private String introduction;
	/**
	 * @generated
	 */
	@OneToMany(mappedBy = "graduateProject",cascade = CascadeType.ALL)
	private Collection<ProjectToMajor> projectToMajors;
	/**
	 * @generated
	 */
	@ManyToOne
	@JoinColumn(name = "proposer_id")
	private Tutor proposer;
	/**
	 * @generated
	 */
	@ManyToOne
	@JoinColumn(name = "projectFrom_id")
	private ProjectFrom projectFrom;
	/**
	 * @generated
	 */
	@ManyToOne
	@JoinColumn(name = "projectType_id")
	private ProjectType projectType;
	/**
	 * @generated
	 */
	@OneToOne
	@JoinColumn(name = "student_id")
	private Student student;
	/**
	 * @generated
	 */
	@OneToOne(mappedBy = "graduateProject")
	private TaskDoc taskDoc;
	/**
	 * @generated
	 */
	@OneToMany(mappedBy = "graduateProject",cascade = CascadeType.ALL)
	private Collection<StageAchievement> stageAchievements;
	/**
	 * @generated
	 */
	private Boolean recommended;
	/**
	 * @generated
	 */
	@ManyToOne
	@JoinColumn(name = "replyGroup_id")
	private ReplyGroup replyGroup;
	/**
	 * @generated
	 */
	@Embedded
	private CommentFromTutor commentFromTutor;
	/**
	 * @generated
	 */
	@OneToMany(mappedBy = "graduateProject")
	private Collection<StudentSelectProject> studentSelectProjects;
	/**
	 * @generated
	 */
	@OneToMany(mappedBy = "graduateProject",cascade = CascadeType.ALL)
	private Collection<Schedule> schedules;
	/**
	 * @generated
	 */
	@Embedded
	private MidInspection midInspection;
	/**
	 * @generated
	 */
	@ManyToOne
	@JoinColumn(name = "chiefTutor_id")
	private Tutor chiefTutor;

	/**
	 * @generated
	 */
	@OneToOne(mappedBy = "graduateProject",cascade = CascadeType.ALL)
	private Post post;

	/**
	 * @generated
	 */
	@Embedded
	private CommentByGroup commentByGroup;

	/**
	 * @generated
	 */
	private String subTitle;
	@OneToOne
	@JoinColumn(name="auditByDirector_id")
	private Audit auditByDirector;
	/**
	 * @generated
	 */
	@OneToMany(mappedBy = "graduateProject",cascade = CascadeType.ALL)
	private Collection<CoTutorage> coTutorages;

	/**
	 * @generated
	 */
	@OneToOne
	@JoinColumn(name = "reviewer_id")
	private Tutor reviewer;
	/**
	 * @generated
	 */
	@OneToOne
	@JoinColumn(name = "auditedByReviewer_id")
	private Audit auditedByReviewer;
	/**
	 * @generated
	 */
	@OneToOne
	@JoinColumn(name = "auditedByTutor_id")
	private Audit auditedByTutor;

	/**
	 * @generated
	 */
	@Embedded
	private ReviewResult reviewResult;

	/**
	 * @generated
	 */
	public Integer getId() {
		return id;
	}

	/**
	 * @param id 
	 * @generated
	 */
	public void setId(Integer id) {
		this.id = id;
	}

	/**
	 * @generated
	 */
	public String getTitle() {
		return title;
	}

	/**
	 * @param title 
	 * @generated
	 */
	public void setTitle(String title) {
		this.title = title;
	}



	public Audit getAuditByDirector() {
		return auditByDirector;
	}

	public void setAuditByDirector(Audit auditByDirector) {
		this.auditByDirector = auditByDirector;
	}

	public String getCategory() {
		return category;
	}

	public void setCategory(String category) {
		this.category = category;
	}

	/**
	 * @generated
	 */
	public String getIntroduction() {
		return introduction;
	}



	public Integer getYear() {
		return year;
	}

	public void setYear(Integer year) {
		this.year = year;
	}

	/**
	 * @param introduction 
	 * @generated
	 */
	public void setIntroduction(String introduction) {
		this.introduction = introduction;
	}

	/**
	 * @generated
	 */
	public Boolean getRecommended() {
		return recommended;
	}

	/**
	 * @param recommended 
	 * @generated
	 */
	public void setRecommended(Boolean recommended) {
		this.recommended = recommended;
	}

	/**
	 * @generated
	 */
	public String getSubTitle() {
		return subTitle;
	}

	/**
	 * @param subTitle 
	 * @generated
	 */
	public void setSubTitle(String subTitle) {
		this.subTitle = subTitle;
	}





	public Collection<ProjectToMajor> getProjectToMajors() {
		return projectToMajors;
	}

	public void setProjectToMajors(Collection<ProjectToMajor> projectToMajors) {
		this.projectToMajors = projectToMajors;
	}

	public Tutor getProposer() {
		return proposer;
	}

	public void setProposer(Tutor proposer) {
		this.proposer = proposer;
	}

	public ProjectFrom getProjectFrom() {
		return projectFrom;
	}

	public void setProjectFrom(ProjectFrom projectFrom) {
		this.projectFrom = projectFrom;
	}

	public ProjectType getProjectType() {
		return projectType;
	}

	public void setProjectType(ProjectType projectType) {
		this.projectType = projectType;
	}

	public Student getStudent() {
		return student;
	}

	public void setStudent(Student student) {
		this.student = student;
	}

	public TaskDoc getTaskDoc() {
		return taskDoc;
	}

	public void setTaskDoc(TaskDoc taskDoc) {
		this.taskDoc = taskDoc;
	}

	public Collection<StageAchievement> getStageAchievements() {
		return stageAchievements;
	}

	public void setStageAchievements(Collection<StageAchievement> stageAchievements) {
		this.stageAchievements = stageAchievements;
	}

	public ReplyGroup getReplyGroup() {
		return replyGroup;
	}

	public void setReplyGroup(ReplyGroup replyGroup) {
		this.replyGroup = replyGroup;
	}

	public CommentFromTutor getCommentFromTutor() {
		return commentFromTutor;
	}

	public void setCommentFromTutor(CommentFromTutor commentFromTutor) {
		this.commentFromTutor = commentFromTutor;
	}

	public Collection<StudentSelectProject> getStudentSelectProjects() {
		return studentSelectProjects;
	}

	public void setStudentSelectProjects(
			Collection<StudentSelectProject> studentSelectProjects) {
		this.studentSelectProjects = studentSelectProjects;
	}

	public Collection<Schedule> getSchedules() {
		return schedules;
	}

	public void setSchedules(Collection<Schedule> schedules) {
		this.schedules = schedules;
	}

	public MidInspection getMidInspection() {
		return midInspection;
	}

	public void setMidInspection(MidInspection midInspection) {
		this.midInspection = midInspection;
	}

	public Tutor getChiefTutor() {
		return chiefTutor;
	}

	public void setChiefTutor(Tutor chiefTutor) {
		this.chiefTutor = chiefTutor;
	}

	public Post getPost() {
		return post;
	}

	public void setPost(Post post) {
		this.post = post;
	}

	public CommentByGroup getCommentByGroup() {
		return commentByGroup;
	}

	public void setCommentByGroup(CommentByGroup commentByGroup) {
		this.commentByGroup = commentByGroup;
	}

	public Collection<CoTutorage> getCoTutorages() {
		return coTutorages;
	}

	public void setCoTutorages(Collection<CoTutorage> coTutorages) {
		this.coTutorages = coTutorages;
	}

	public Tutor getReviewer() {
		return reviewer;
	}

	public void setReviewer(Tutor reviewer) {
		this.reviewer = reviewer;
	}

	public Audit getAuditedByReviewer() {
		return auditedByReviewer;
	}

	public void setAuditedByReviewer(Audit auditedByReviewer) {
		this.auditedByReviewer = auditedByReviewer;
	}

	public Audit getAuditedByTutor() {
		return auditedByTutor;
	}

	public void setAuditedByTutor(Audit auditedByTutor) {
		this.auditedByTutor = auditedByTutor;
	}

	public ReviewResult getReviewResult() {
		return reviewResult;
	}

	public void setReviewResult(ReviewResult reviewResult) {
		this.reviewResult = reviewResult;
	}
	
}